main(a,b,c,d,e,f)
{
	for(;~scanf("%d%d%d",&a,&b,&c)&&a;puts(d*d+e*e-f*f?"wrong":"right"))
		d=a<b?a<c?a:c:b<c?b:c,f=a>b?a>c?a:c:b>c?b:c,e=d-a?f-a?a:d-b?b:c:f-b?b:c;
}
